#ifndef _GUI_CONTROL_H_
#define _GUI_CONTROL_H_

#include <sfFlashControl.h>
#include <boost/intrusive/list.hpp>

/*final*/
class GUIControl:
	public sf::FlashControl,
	public boost::intrusive::list_base_hook<>
{
	friend class GUIManager;
public:
	virtual ~GUIControl();

	bool isDraggable() const { return titleBarHeight > 0;}
	void setTitleBarHeight(int value) {titleBarHeight = value;}
	virtual SwfUI::Argument onFlashCall(const std::wstring& functionName, const SwfUI::ArgumentList& args);

private:	
	GUIControl(int width, int height);

	int titleBarHeight;
	bool markedForDeletion;
};


#endif